<template>
  <div>
    <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
      
      <el-menu :default-active="activeIndex2" class="el-menu-demo" mode="horizontal" @select="handleSelect" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
        <el-menu-item index="1">热损耗</el-menu-item>
        <el-menu-item index="2">温度实际值输入</el-menu-item>
        <el-menu-item index="3">装置列表</a></el-menu-item>
      </el-menu>
      <template>
        <div v-if="activeIndex === '1'">
          此处展示信息1
        </div>
        <div v-if="activeIndex === '2'">
          此处展示信息2
        </div>
        <div v-if="activeIndex === '3'">
          <el-form>

          </el-form>
        </div>
<!--        <span v-if="activeIndex === '2'">此处展示信息2</span>
        <span v-if="activeIndex === '3'">此处展示信息3</span> -->
      </template>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
  export default{
    data(){
      return{
        dialogVisible:true,
        activeIndex: '1',
        activeIndex2: '1'
      };
    },
    methods:{
      handleSelect(key, keyPath) {
        this.activeIndex = key
        console.log(key, keyPath);
      }
    }
  }
</script>

<style>
 .ec-dialog {
    .el-dialog__header {
      background: hsl(199, 58%, 75%);
    }

    /* 弹出层设置背景色 底部*/

    .el-dialog__footer {
      background-color: hsl(199, 58%, 75%) !important;
    }
    /* 弹出层设置背景色 身体部份*/
    .el-dialog__body {
      background: linear-gradient(to bottom, hsl(199, 58%, 75%));
      background-size: 100%, 100%;
    }
 }
</style>
